#pragma once
#include "CDataBase.h"


# if defined(Project_LIB)
#  define PROJECT_EXPORT __declspec(dllexport)
# else
#  define PROJECT_EXPORT __declspec(dllimport)
# endif


struct DataInfo
{
	double  x;
	double  y;
	double  R;
	double  P0;
	double  P1;
	double  P2;
public:
	DataInfo()
	{
		x = 0;
		y = 0;
		R = 0;
		P0 = 0;
		P1 = 0;
		P2 = 0;
	}
};

struct ShapePara
{
	double  P0;
	double  P1;
	double  P2;
	double  P3;
	double  P4;
	double  P5;
	double  P6;
	double  P7;

public:
	ShapePara()
	{
		P0 = 0;
		P1 = 0;
		P2 = 0;
		P3 = 0;
		P4 = 0;
		P5 = 0;
		P6 = 0;
		P7 = 0;
	}
};


struct AppearencePara
{
	double  Gray;
	double  Len;
	double  Width;
	double  Area;
public:
	AppearencePara()
	{
		Gray = 0;
		Len = 0;
		Width = 0;
		Area = 0;
	}
};


//struct _ImgRsult
//{
//	DataInfo data;
//	QString strCode;
//};


struct _ImgRsult
{
	int P[3];
	QString str[5];
	_ImgRsult()
	{
		for (int i=0;i<3;i++)
		{
			P[i] = 9999;
		}
	}
};

class PROJECT_EXPORT ProjectData :public CDataBase
{
private:
	friend class boost::serialization::access;
	template<class Archive>
	void serialize(Archive& ar, const unsigned int version)
	{
		ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(CDataBase);
	}

public:
	ProjectData();
	~ProjectData();
	virtual void writeData(MyAlgoDialog* p) override;
	virtual void readData(MyAlgoDialog* p)  override;
};

